import request from '@/config/axios'

// 阶段-轮次-候选人得分记录 VO
export interface StageRoundScoreVO {
  id: string // 候选人得分记录ID
  roundCandidateId: string // 阶段轮次候选人ID
  candidateId: string // 候选人ID
  score: string // 得分
  instanceRuleId: string // 评奖阶段规则设置ID
  awardsId: string // 评奖ID
  roundId: string // 轮次ID
  judgeId: string // 评委设置ID
  remark: string // 备注
}

// 阶段-轮次-候选人得分记录 API
export const StageRoundScoreApi = {
  // 查询阶段-轮次-候选人得分记录分页
  getStageRoundScorePage: async (params: any) => {
    return await request.get({ url: `/awards/stage-round-score/page`, params })
  },

  // 查询阶段-轮次-候选人得分记录详情
  getStageRoundScore: async (id: string) => {
    return await request.get({ url: `/awards/stage-round-score/get?id=` + id })
  },

  // 新增阶段-轮次-候选人得分记录
  createStageRoundScore: async (data: StageRoundScoreVO) => {
    return await request.post({ url: `/awards/stage-round-score/create`, data })
  },

  // 修改阶段-轮次-候选人得分记录
  updateStageRoundScore: async (data: StageRoundScoreVO) => {
    return await request.put({ url: `/awards/stage-round-score/update`, data })
  },

  // 删除阶段-轮次-候选人得分记录
  deleteStageRoundScore: async (id: string) => {
    return await request.delete({ url: `/awards/stage-round-score/delete?id=` + id })
  },

  // 导出阶段-轮次-候选人得分记录 Excel
  exportStageRoundScore: async (params) => {
    return await request.download({ url: `/awards/stage-round-score/export-excel`, params })
  }
}
